<template>
  <ul class="fake-block">
    <li v-for="index in showListNum" :key="index"></li>
    <li>
      <a-button type="primary" size="small" @click="showListNum = showListNum + 10">添加</a-button>
    </li>
  </ul>
</template>

<script>
export default {
  name: 'FakeBlock',
  props: {
    num: Number
  },
  data () {
    return {
      showListNum: this.num
    }
  }

}
</script>

<style scoped lang="less">
.fake-block {
  padding: 20px 4%;
  box-sizing: border-box;
  li {
    margin-bottom: 15px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .05);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
    position: relative;
    height: 10rem;
    text-align: center;
    &:after {
      content: '';
      position: absolute;
      width: 40px;
      height: 10px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: #ccc;
    }
    &:last-child {
      margin-bottom: 0;
    }
  }
}
</style>
